Optimal. Leaf size=66 \[ -\frac {i \, _2F_1\left (1,n;1+n;-\frac {1}{2} i (i+\cot (c+d x))\right ) \sin ^{-n}(c+d x) (a \cos (c+d x)+i a \sin (c+d x))^n}{2 d n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.030, Rules used = {3162}
\begin {gather*} -\frac {i \sin ^{-n}(c+d x) \, _2F_1\left (1,n;n+1;-\frac {1}{2} i (\cot (c+d x)+i)\right ) (a \cos (c+d x)+i a \sin (c+d x))^n}{2 d n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3162
Rubi steps
\begin {align*} \int \sin ^{-n}(c+d x) (a \cos (c+d x)+i a \sin (c+d x))^n \, dx &=-\frac {i \, _2F_1\left (1,n;1+n;-\frac {1}{2} i (i+\cot (c+d x))\right ) \sin ^{-n}(c+d x) (a \cos (c+d x)+i a \sin (c+d x))^n}{2 d n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 3.86, size = 367, normalized size = 5.56 \begin {gather*} -\frac {4 \cos \left (\frac {1}{2} (c+d x)\right ) \left (F_1\left (1-n;-2 n,1;2-n;-i \tan \left (\frac {1}{2} (c+d x)\right ),i \tan \left (\frac {1}{2} (c+d x)\right )\right )+\, _2F_1\left (1-2 n,1-n;2-n;-i \tan \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin \left (\frac {1}{2} (c+d x)\right ) (a (\cos (c+d x)+i \sin (c+d x)))^n \sin ^{-n}(c+d x)}{d (-1+n) \left (2 F_1\left (1-n;-2 n,1;2-n;-i \tan \left (\frac {1}{2} (c+d x)\right ),i \tan \left (\frac {1}{2} (c+d x)\right )\right )+\frac {\left (-2 n F_1\left (2-n;1-2 n,1;3-n;-i \tan \left (\frac {1}{2} (c+d x)\right ),i \tan \left (\frac {1}{2} (c+d x)\right )\right ) (-1+\cos (c+d x)+i \sin (c+d x))-F_1\left (2-n;-2 n,2;3-n;-i \tan \left (\frac {1}{2} (c+d x)\right ),i \tan \left (\frac {1}{2} (c+d x)\right )\right ) (-1+\cos (c+d x)+i \sin (c+d x))+(-2+n) (1+\cos (c+d x)) \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )^{2 n}\right ) \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{-2+n}\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.16, size = 0, normalized size = 0.00 \[\int \left (a \cos \left (d x +c \right )+i a \sin \left (d x +c \right )\right )^{n} \left (\sin ^{-n}\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (i \sin {\left (c + d x \right )} + \cos {\left (c + d x \right )}\right )\right )^{n} \sin ^{- n}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\left (a\,\cos \left (c+d\,x\right )+a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n}{{\sin \left (c+d\,x\right )}^n} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________